home *** CD-ROM | disk | FTP | other *** search
- property pPreOrPri, pName, pWidth, pHeight, pScaling, stageRect, DestRect, pRect1, pRect2, pRect3, pRect4, sRect1, sRect2, sRect3, sRect4, dRect1, dRect2, dRect3, dRect4, pOriantation
-
- on mouseUp me
- doc = new(xtra("PrintOMatic"))
- if not objectp(doc) then
- alert("There is no currently selected printer.")
- exit
- end if
- setDocumentName(doc, pName)
- setMargins(doc, rect(pRect1, pRect2, pRect3, pRect4))
- stageRect = rect(sRect1, sRect2, sRect3, sRect4)
- DestRect = rect(dRect1, dRect2, dRect3, dRect4)
- if pOriantation = "Portrait" then
- setLandscapeMode(doc, 0)
- else
- setLandscapeMode(doc, 1)
- end if
- pWidth = getPageWidth(doc)
- pHeight = getPageHeight(doc)
- pScaling = min(1.0, float(pWidth) / float(stageRect[3] - stageRect[1]))
- pScaling = min(pScaling, float(pHeight) / float(stageRect[4] - stageRect[2]))
- DestRect = rect((pWidth / 2) + pRect1, 0, pWidth - 11, pHeight)
- newPage(doc)
- drawPicture(doc, member("Marbit"), point(0, 460))
- drawStagePicture(doc, DestRect, stageRect, 1)
- if pPreOrPri = "Print" then
- if doJobSetup(doc) then
- print(doc)
- end if
- end if
- if pPreOrPri = "Preview" then
- if doJobSetup(doc) then
- printPreview(doc)
- end if
- end if
- if pPreOrPri = "both" then
- if doJobSetup(doc) then
- printPreview(doc)
- print(doc)
- end if
- end if
- doc = 0
- end
-
- on getPropertyDescriptionList
- return [#pName: [#comment: "Name of Job:", #format: #string, #default: "StusJob"], #pPreOrPri: [#comment: "Options of print:", #format: #string, #default: "Print", #range: ["Print", "Preview", "Both"]], #pOriantation: [#comment: "Oriantation:", #format: #string, #default: "Portrait", #range: ["Portrait", "Landscape"]], #pRect1: [#comment: "Margins left:", #format: #integer, #default: 32], #pRect2: [#comment: "Margins top:", #format: #integer, #default: 32], #pRect4: [#comment: "Margins right:", #format: #integer, #default: 32], #pRect3: [#comment: "Margins bottom:", #format: #integer, #default: 32], #sRect1: [#comment: "Stage left:", #format: #integer, #default: 32], #sRect2: [#comment: "Stage top:", #format: #integer, #default: 32], #sRect3: [#comment: "Stage right:", #format: #integer, #default: 32], #sRect4: [#comment: "Stage bottom:", #format: #integer, #default: 32], #dRect1: [#comment: "Destination left:", #format: #integer, #default: 32], #dRect2: [#comment: "Destination top:", #format: #integer, #default: 32], #dRect3: [#comment: "Destination right:", #format: #integer, #default: 32], #dRect4: [#comment: "Destination bottom:", #format: #integer, #default: 32]]
- end
-